/*
 * $Id$
 *
 * Copyright ( c ) 2014 XuNuo Corporation. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of XuNuo
 * Corporation ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with the terms
 * of the license agreement you entered into with XuNuo Corporation or a XuNuo
 * authorized reseller (the "License Agreement"). XuNuo may make changes to the
 * Confidential Information from time to time. Such Confidential Information may
 * contain errors.
 *
 * EXCEPT AS EXPLICITLY SET FORTH IN THE LICENSE AGREEMENT, XuNuo DISCLAIMS ALL
 * WARRANTIES, COVENANTS, REPRESENTATIONS, INDEMNITIES, AND GUARANTEES WITH
 * RESPECT TO SOFTWARE AND DOCUMENTATION, WHETHER EXPRESS OR IMPLIED, WRITTEN OR
 * ORAL, STATUTORY OR OTHERWISE INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A
 * PARTICULAR PURPOSE. XuNuo DOES NOT WARRANT THAT END USER'S USE OF THE
 * SOFTWARE WILL BE UNINTERRUPTED, ERROR FREE OR SECURE.
 *
 * XuNuo SHALL NOT BE LIABLE TO END USER, OR ANY OTHER PERSON, CORPORATION OR
 * ENTITY FOR INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL
 * DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR USE, WHETHER IN AN
 * ACTION IN CONTRACT, TORT OR OTHERWISE, EVEN IF XuNuo HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES. XuNuo' TOTAL LIABILITY TO END USER SHALL NOT
 * EXCEED THE AMOUNTS PAID FOR THE XuNuo SOFTWARE BY END USER DURING THE PRIOR
 * TWELVE (12) MONTHS FROM THE DATE IN WHICH THE CLAIM AROSE.  BECAUSE SOME
 * STATES OR JURISDICTIONS DO NOT ALLOW LIMITATION OR EXCLUSION OF CONSEQUENTIAL
 * OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO END USER.
 *
 * Copyright version 2.0
 */
package com.th.supcom.pds.phamapply.client.widget.phamdispense;

import com.extjs.gxt.ui.client.widget.form.ComboBox;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.th.supcom.framework.dict.web.gwt.client.DictComboBox;
import com.th.supcom.framework.dict.web.gwt.client.model.DictModel;
import com.th.supcom.pds.common.client.model.CodeConstants;

/**
 * 住院摆药组件集合
 * 
 * @author 杨冲
 */
public class PhamDispenseFields
{

    /** 摆药类型 */
    private DictComboBox m_dispenseType;
    /** 职工号 */
    private TextField <String> empID;
    /** 职工姓名 */
    private TextField <String> empName;
    /** 二维码扫描输入框*/
    private TextField <String> barCode;

    /**
     * 构造函数
     */
    public PhamDispenseFields ()
    {
        createFields ();
    }

    /**
     * 创建组件
     */
    private void createFields ()
    {
        m_dispenseType = new DictComboBox (CodeConstants.PDS_INP_DISPENSE_TYPE_CODE);
        m_dispenseType.setFieldLabel ("摆药类型");
        m_dispenseType.setHasAll (true);
        
        barCode = new TextField <String> ();
        barCode.setFieldLabel ("请领单号");
        barCode.setPassword (true);
    }

    /**
     * 获取摆药类型
     * 
     * @return
     */
    public ComboBox <DictModel> getDispenseType ()
    {

        return m_dispenseType;
    }

    /**
     * 获取职工ID组件
     * 
     * @return
     */
    public TextField <String> getEmpID ()
    {
        empID = new TextField <String> ();
        empID.setFieldLabel ("员工&nbsp;&nbsp;&nbsp;&nbsp;ID");
        return empID;
    }

    /**
     * 获取职工姓名组件
     * 
     * @return
     */
    public TextField <String> getEmpName ()
    {
        empName = new TextField <String> ();
        empName.setFieldLabel ("员工姓名");
        return empName;
    }
    
    /**
     * 获取请领单号查询的二维码输入框
     * @return
     */
    public TextField <String> getBarCode() {
        return barCode;
    }

}
